package com.seele.tigerwallet.jpush;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;

import com.seele.tigerwallet.utils.Constants;
import com.seele.tigerwallet.utils.SeeleFileMap;
import com.seele.tigerwallet.utils.Utils;

import java.util.HashSet;
import java.util.Set;

import cn.jpush.android.api.BasicPushNotificationBuilder;
import cn.jpush.android.api.JPushInterface;

public class JPushService extends Service {

    public static boolean isForeground = false;

    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }
    @Override
    public void onCreate() {
        super.onCreate();
        Log.i("jpush", "JPushService onCreate.");
        JPushInterface.setDebugMode(true);
        JPushInterface.init(this);
        Log.i("jpush", "JPushService push id:" + JPushInterface.getRegistrationID(this));
        SeeleFileMap.putString(Constants.KEY_JPUSH_ID, JPushInterface.getRegistrationID(this));
        JPushInterface.setDefaultPushNotificationBuilder(new BasicPushNotificationBuilder(this));

    }

    @Override
    public void onDestroy() {
        super.onDestroy();

    }



}
